<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>按宿舍查询</title>
    <link type="text/css" href="css/base.css" rel="stylesheet" />
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/menu.js"></script>
    <!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>

<body>
<%@ include file="/page/share/menu.jsp" %>

<div id="content" style="width: 1000px;margin-left: 17%;">
    <form method="post" action="Student!findStuByDormitoryId.action">
        <table>
            <tr>
                <td align="right">
                    校&nbsp;&nbsp;区&nbsp;：
                </td>
                <td style=" width: 160px;">
                    <label>
                        <select name="campus" style="height: 23px;margin: 2px auto;  width: 150px;">
                            <option value="大学城校区"> 大学城校区</option>
                            <option value="赤岗校区"> 赤岗校区</option>
                            <option value="中山校区"> 中山校区</option>
                        </select>
                    </label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    宿舍编号：
                </td>
                <td>
                    <input type="text" name="dormitoryId" value="" style="width: 150px;height: 25px;"/><br/>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" value="查询" onMouseOver="this.style.background='#2569c1'" onmouseout="this.style.background='#114a93'" style="width:150px;height:25px;cursor:pointer;border: none;background: #2569c1;color: white;font-size: 16px;" />
                </td>
            </tr>
        </table>
    </form>
    <form method="post" action="" align="center">
        <table align="center"
               style="margin: 40px auto 20px;background: #114a93;opacity:0.9;font-family: '微软雅黑',serif;color: linen;width:
    1000px;text-align: center">
            <thead align="center">
            <tr>
                <th>
                    学 号
                </th>
                <th>
                    离校时间
                </th>
                <th>
                    宿舍角色
                </th>
                <th>
                    电 话
                </th>
                <th>
                    性 别
                </th>
                <th>
                    姓 名
                </th>
                <th>
                    宿 舍
                </th>
                <th>
                    专 业
                </th>
            </tr>
            </thead>
            <s:iterator value="students" var="s">
                <tr align="center">
                    <td>
                            <s:property value="#s.studentId"/>
                        &nbsp;
                    <td>
                    <fmt:formatDate value="${s.leaveDate}" pattern="yyyy-MM-dd"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.monitor"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.phone"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.sex"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.studentName"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.dormitory.dormitoryId"/>
                        &nbsp;
                    </td>
                    <td>
                        <s:property value="#s.major.majorName"/>
                        &nbsp;
                    </td>
                </tr>
            </s:iterator>
        </table>
        </form>
</div>


<div id="footer">
    <p style="text-align: center;color: #757575;padding: 20px 0px 0px 0px; font:12px;">Copyright © 2010-2013 蓝天白云团队 版权所有</p>
</div>
</body>
</html>